set(CUR_TARGET MyGameEngineMacOpenGL)
add_executable(
    ${CUR_TARGET}
    MACOSX_BUNDLE
    MacApplication.h
    MacApplication.mm
    AppDelegate.h
    AppDelegate.mm
    OpenGLView.mm
)

target_link_libraries(${CUR_TARGET} Common OpenGLRHI)

set(VERSION_STRING "0.1")

set_target_properties(
    ${CUR_TARGET} PROPERTIES
    BUNDLE True
    MACOSX_BUNDLE_GUI_IDENTIFIER my.domain.style.identifier.${CUR_TARGET}
    MACOSX_BUNDLE_BUNDLE_NAME ${CUR_TARGET}
    MACOSX_BUNDLE_INFO_STRING "${CUR_TARGET}${DBG_EXTENSION} Version ${VERSION_STRING}, Copyright 2022, dream zhou. All Rights Reserved."
    # MACOSX_BUNDLE_ICON_FILE ${ICON_FILE_NAME}
    MACOSX_BUNDLE_LONG_VERSION_STRING "${CUR_TARGET}${DBG_EXTENSION} Version ${VERSION_STRING}"
    MACOSX_BUNDLE_SHORT_VERSION_STRING ${VERSION_STRING}
    MACOSX_BUNDLE_BUNDLE_VERSION ${VERSION_STRING}
    MACOSX_BUNDLE_COPYRIGHT "Copyright 2022, dream zhou. All Rights Reserved."

    MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/plist.in
)

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppKit -framework GLKit -framework OpenGL")

add_custom_target(CopyTask
    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Asset/Shaders/ ${CMAKE_CURRENT_LIST_DIR}/Asset/
    )